<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			/*
			   排序
			*/
			var arr = [7, 10, 6, 12, 3, 20];
			var t;
			for (var x = 0; x < arr.length - 1; x++) {
				for (var j = x + 1; j < arr.length; j++) {
					if (arr[x] > arr[j]) {
						t = arr[x];
						arr[x] = arr[j];
						arr[j] = t;
					}
				}
			}
			for (var i = 0; i < arr.length; i++) {
				// console.log(arr[i]);
			}

			// if (arr[0] > arr[2]) {
			// 	t = arr[0];
			// 	arr[0] = arr[2];
			// 	arr[2] = t;
			// }

			/*
			  数组翻转
			*/
			var m = 0;
			for (var y = 0, n = arr.length; y < n; y++, n--) {
				m = arr[y];
				arr[y] = arr[n];
				arr[n] = m;
			}

			for (var i = 0; i < arr.length; i++) {
				console.log(arr[i]);
			}
		</script>
		<script type="text/javascript">
			var arr6 = [];
			var arr7 = [1, 2, 3];
			arr6[0] = arr7;
			console.log(arr6[0]);
			console.log(arr6[0][0]);
		</script>
	</head>
	<body>
	</body>
</html>
